home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Greatest Hits / rerun-greatest-hits-vol-i.d64 / disk keeper (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  7.9 KB  |  215 lines

  1. 100 rem f$ and d$ must be first two program variables!
  2. 110 f$="":dimd$(200),d%(200):pr=4:elite=0:a$="-":b$=":"
  3. 120 poke53280,0:poke53281,0:fork=1to80:bl$=bl$+" ":next:bb$=mid$(bl$,1,9)
  4. 130 dimtp$(4):tp$(1)=" seq":tp$(2)=" prg":tp$(3)=" usr":tp$(4)=" rel"
  5. 140 dime$(2):e$(0)="":e$(1)="  ":e$(2)="   "
  6. 150 gosub9100:r=12:c=7:gosub9000:print"please wait--initializing";
  7. 160 j=0:fork=49152to49364:readn:j=j+n:pokek,n:next:poke49248,4
  8. 170 ifj<>29842thenprint"error in data statements 10000-10110:end
  9. 180 j[178]0:[129]k[178]828[164]866:[135]n:j[178]j[170]n:[151]k,n:[130]
  10. 190 [139]j[179][177]6665[167][153]"error in data statements 20000-20020:end
  11. 200 j=0:fork=50000to50098:readn:j=j+n:pokek,n:next
  12. 210 ifj<>14887thenprint"error in data statements 30000-30050:end
  13. 220 [141]9000:[153]bl$
  14. 230 [141]9100:[141] 9200
  15. 240 [145] x [137]6500,3000,8500,7100,7200,7500,5500,5000,9999
  16. 3000 [141]9100:[153][163]12)"make disk label":[141]9500:[139]er[177]19[167]230
  17. 3010 [153][163]12)"1) jacket insert"
  18. 3020 [153][163]12)"2) full jacket"
  19. 3030 [153][163]11)"choose format:    cmdcmd";:[141]9090:w[178]1:[141]8000:x[178][197](s$)
  20. 3040 [139]s$[178]"1"[176]s$[178]"2"[167]3070
  21. 3050 [139]s$[178]""[167]230
  22. 3060 [153]:[153][163]4)"choose a number between 1 and 2ononon":[137]3030
  23. 3070 g[178][197](s$)[171]1
  24. 3080 [153][163]4)" type in optional label string  ":r[178]14:c[178]8:w[178]24:[141]8000
  25. 3090 l$[178]s$:ff[178]1
  26. 3100 [141]9090:[153][163]11)"reading directory":[141]6000
  27. 3110 [141]9400:[151]781,r:[158]828:[153][163]16)"printing"
  28. 3120 [160]4:[159]4,pr:x$[178]"":[129]k[178]1[164]9:x$[178]x$[170]a$:[130]
  29. 3130 y$[178]b$[170]"        ":z$[178]"        "[170]b$:ww[178]54:d$(nf[170]1)[178][202](bl$,1,25):lm[178]22
  30. 3140 d$(nf[170]2)[178]d$(nf[170]1):[139]g[167]lm[178]lm[171]4:g[178]g[170]el:ww[178]ww[170]2[172][195](e$(g))
  31. 3150 [139][195](l$)[179]ww[171]2[172][195](e$(g))[171]29[167]l$[178]l$[170]"close":[137]3150
  32. 3160 f$[178]n$:[158]50046:[141]3500:[141]3600:[139]g[167][152]4,y$;
  33. 3170 l$[178]b$[170]e$(g)[170]"  "[170]f$[170]e$(g)[170]"    "[170]l$[170]b$:[152]4,l$;:[139]g[167][152]4,z$;
  34. 3180 [152]4:[141]3600:[141]3500:[141]3600:j[178][181](nf[173]2):[139]j[178]0[167]j[178]1
  35. 3190 [129]m[178]1[164]j:[139]g[167][152]4,y$;
  36. 3200 f$[178]d$(m):[158]50046:h$[178]f$:f$[178]d$(m[170]j):[158]50046
  37. 3210 [152]4,b$;e$(g);h$"  "f$;e$(g);b$;:[139]g[167][152]4,z$;
  38. 3220 [152]4:[139]m[179][177]17[176]g[178]0[167]3240
  39. 3230 [139]m[179][177]j[167][141]3600:[141]3500:y$[178]bb$:z$[178]y$:[141]3600:ff[178]0
  40. 3240 [130]m:[141]3800:[129]m[178]m[164]lm:[141]3600:[130]
  41. 3250 [139]ff[167][141]3500:[139]g[178]0[167]3290
  42. 3260 [139]g[178]0[167]3290
  43. 3270 g[178]0:[129]m[178]m[164]lm[170]27:[152]4,bb$;:[141]3600:[130]
  44. 3280 [152]4,bb$;:[141]3500
  45. 3290 [152]4:[160]4:[137]230
  46. 3500 [139]g[167][152]4,x$;
  47. 3510 [129]k[178]1[164]ww:[152]4,a$;:[130]:[139]g[167][152]4,x$;
  48. 3520 [152]4:[142]
  49. 3600 [139]g[167][152]4,y$;
  50. 3610 [152]4,b$;:[152]4,[202](bl$,1,ww[171]2);:[152]4,b$;:[139]g[167][152]4,z$;
  51. 3620 [152]4:[142]
  52. 3800 [141]3600:[139]g[167][152]4,y$;
  53. 3810 x[178](ww[171]17)[173]2:[152]4,b$[202](bl$,1,x)[202](bl$,1,4[171][195]([196](bf)));
  54. 3820 [152]4,bf"blocks free"[202](bl$,1,ww[171]x[171]17);b$;:[139]g[167][152]4,z$;
  55. 3830 [152]4:m[178]m[170]2:[142]
  56. 5000 [141]9100:[153][163]11)"send disk command"
  57. 5010 [153]"   type disk command and press return"
  58. 5020 r[178]10:c[178]2:w[178]36:[141]8000:[139]s$[178]""[167]230
  59. 5030 [141]9500:[152]15,s$:[141]9600
  60. 5040 [139]er[177]19[167][160]15:[137]230
  61. 5050 [153]:[153][163]19)"ok":x$[178][202](s$,1,1)
  62. 5060 [139]x$[178]"v"[176]x$[178]"s"[176]x$[178]"r"[176]x$[178]"n"[176]x$[178]"c"[167]nn$[178]""
  63. 5070 [160]15:[141]9800:[137]230
  64. 5500 [141]9100:[153][163]12)"format new disk"
  65. 5510 [153][163]8)"enter name for new disk":
  66. 5520 r[178]10:c[178]11:w[178]16:[141]8000:[139]s$[178]""[167]230
  67. 5530 sn$[178]s$:[153]"   enter unique two character disk id"
  68. 5540 r[178]14:c[178]18:w[178]2:[141]8000:[139]s$[178]""[167]230
  69. 5550 [139][195](s$)[179][177]2[167][153]"ononononon":[137]5530
  70. 5560 sd$[178]s$:[153][163]5)"warning!  formatting will erase"
  71. 5570 [153][163]5)"any existing files on the disk!"
  72. 5580 [153][163]8)"proceed with format?":r[178]19:c[178]30:w[178]1:[141]8000
  73. 5590 [139]s$[179][177]"y"[167]230
  74. 5600 [141]9700:[153][163]9)"formatting in progress"
  75. 5610 [160]15:[159]15,8,15:[152]15,"new0:"sn$","sd$:[160]15:nn$[178]"":[137]230
  76. 5999 [143] read disk directory into d$
  77. 6000 [141]9500:[139]er[167]230
  78. 6010 [141]8200:t[178]18:s[178]1:[139]n$[178]nn$[175]fp[178]0[167][160]3:[142]
  79. 6020 nn$[178]n$:[139]fp[178]0[167]nf[178]0
  80. 6030 [152]15,"b-p:3,4":bf[178]0:[129]k[178]1[164]35:[161]#3,x$
  81. 6040 [139]x$[179][177]""[175]k[179][177]18[167]bf[178]bf[170][198](x$)
  82. 6050 [161]#3,x$:[161]#3,x$:[161]#3,x$:[130]
  83. 6060 tt[178]t:ss[178]s:[152]15,"b-r:3,0";t;s:[152]15,"b-p:3,0"
  84. 6070 [161]#3,t$:t[178]0:[139]t$[179][177]""[167]t[178][198](t$)
  85. 6080 [161]#3,s$:s[178]0:[139]s$[179][177]""[167]s[178][198](s$)
  86. 6090 [129]k[178]0[164]7:[152]15,"b-p:3";k[172]32[170]2:[161]#3,x$:[139]x$[178]""[167]6210
  87. 6100 w[178][198](x$):y$[178]tp$(w[175]7):[139](w[175]128)[179][177]128[167]y$[178]"*"[170][202](y$,2)
  88. 6110 [139](w[175]64)[178]64[167]y$[178]y$[170]"<":[137]6130
  89. 6120 y$[178]y$[170]" "
  90. 6130 [152]15,"b-p:3";k[172]32[170]30:[161]#3,x$:b[178][198](x$):[161]#3,x$
  91. 6140 [139]x$[179][177]""[167]b[178]b[170]256[172][198](x$)
  92. 6150 c$[178][202]([196](b),2):[139][195](c$)[179]3[167]c$[178][202]("    ",1,3[171][195](c$))[170]c$
  93. 6160 [152]15,"b-p:3";k[172]32[170]5:[158]50000:[139]f$[179][177]ff$[176]fp[178]0[167]6200
  94. 6170 [152]15,"b-p:3";k[172]32[170]2:ex[178]0
  95. 6180 x[178]w[176]64:[139]fp[178]2[167]x[178]w[175]191
  96. 6190 [152]3,[199](x);:[152]15,"b-p:3,0":[152]15,"u2:3,0";tt;ss:[142]
  97. 6200 [139]fp[178]0[167]nf[178]nf[170]1:d$(nf)[178]c$[170]" "[170]f$[170]y$
  98. 6210 [130]k:[139]t[179][177]0[167]6060
  99. 6220 [160]3:[160]15:[142]
  100. 6500 [141]9100:[153][163]11)"display directory"
  101. 6510 [153][163]11)"reading directory":[141]6000:[141]9700
  102. 6520 [141]9400:k[178]1
  103. 6530 [141]9700:[153][163]11)""n$"":j[178]0:[139]nf[179]1[167]6550
  104. 6540 [153][163]7)d$(k):k[178]k[170]1:j[178]j[170]1
  105. 6550 [139] k[179][178]nf [175] j[179][177]10 [167]6540
  106. 6560 [139]k[177][178]nf[167][153][163]12)""bf"blocks free"
  107. 6570 [141] 9800:[139]x$[178]"*"[167]230
  108. 6580 [139]x$[178]"on"[176]x$[178]"^"[167]k[178]k[171]20:[139]k[179]1[167]k[178]1
  109. 6590 [139](k[179]nf)[176](k[178]1[175]x$[178]"on")[167]6530
  110. 6600 [137]230
  111. 7100 fp[178]1:p$[178]"protect":[137]7210
  112. 7200 fp[178]2:p$[178]"unprotect"
  113. 7210 [141]9100:[153][163]14[171]fp)""p$" file":[153][163]3[171]fp)"file to "p$": "
  114. 7220 w[178]16:r[178]10:c[178]21:[141]8000:ex[178]1:ff$[178]s$:sx$[178]s$:[139]s$[178]""[167]230
  115. 7230 [139][195](ff$)[179]16[167]ff$[178]ff$[170][199](160):[137]7230
  116. 7240 [141]6000:[153]
  117. 7250 [139]ex[178]0[167][153][163]13[171]fp[171][195](sx$)[173]2)""sx$" is now "p$"ed":nn$[178]"":[137]7270
  118. 7260 [153][163]11[171][195](sx$)[173]2)""sx$" is not on the disk"
  119. 7270 fp[178]0:[160]3:[160]15:[141]9800:[137]230
  120. 7500 [141]9100:[153][163]14)"rename disk":[141]9500:[139]er[177]19[167]230
  121. 7510 [141]8200:[153][163]11[171][195](n$)[173]2)"current disk name: "n$
  122. 7520 [153][163]7)"please input new disk name":r[178]13:c[178]12:w[178]16:[141]8000
  123. 7530 [139][195](s$)[178]0[167][160]3:[160]15:[137]230
  124. 7540 [139][195](s$)[179]16[167]s$[178]s$[170][199](160):[137]7540
  125. 7550 [152]15,"b-p:3,144":[152]3,s$;:[152]15,"u2:3,0,18,0":[160]3
  126. 7560 [141]9600:[139]er[177]19[167][160]3:[160]15:[137]230
  127. 7570 [153]:[153][163]9)"disk has been renamed":[152]15,"i0:":[160]15
  128. 7580 [129]k[178]1[164]3000:[130]:[137]230
  129. 8000 [141]9000:[153]"cmd>"[202](bl$,1,w)"wait<";:[141]9000:n[178]0:s$[178]""
  130. 8010 [151]204,0:[161]x$:[139]x$[178]""[167]8010
  131. 8020 [151]204,1:[151]212,0:x[178][198](x$):[139]x[179][177]13[167]8050
  132. 8030 [153]" ";:[139][195](s$)[178]w[167][153]"cmdwait<";
  133. 8040 [153]:[142]
  134. 8050 [139]x[179][177]20[176]n[178]0[167]8090
  135. 8060 n[178]n[171]1:s$[178][202](s$,1,n):[141]9000:[153]""s$;:[151]212,0:[153]"closeclosecmd";
  136. 8070 [139][195](s$)[178]w[171]1[167][153]"wait<";
  137. 8080 c[178]c[170]n:[141]9000:c[178]c[171]n:[137]8010
  138. 8090 [139]n[178]w[167]8010
  139. 8100 [139](x[177]31[175]x[179]129)[176](x[177]161)[167][153]x$;:s$[178]s$[170]x$:n[178]n[170]1
  140. 8110 [137]8010
  141. 8200 [160]3:[159]3,8,3,"#":n$[178]"":[152]15,"u1:3,0,18,0":[152]15,"b-p:3,144"
  142. 8210 [129]k[178]1[164]16:[161]#3,x$:[139][198](x$)[178]160[167]x$[178]"close"
  143. 8220 n$[178]n$[170]x$:[130]:[161]#3,x$:[161]#3,x$:[161]#3,x$:[161]#3,y$:n$[178]n$[170]" ("[170]x$[170]y$[170]")"
  144. 8230 [142]
  145. 8500 [141]9100:[153][163]13)"clean up disk"
  146. 8510 f2[178]0:[153][163]11)"reading directory":[141]6000
  147. 8520 [141]9400:[129]k[178]1[164]nf:d%(k)[178]0:[130]:r[178]11:c[178]29:w[178]1:k[178]1
  148. 8530 [141]9700:[153][163]7)""d$(k)
  149. 8540 [153][163]8)"delete this file? ";:[141]8000:[139]s$[178]""[167]230
  150. 8550 [139]s$[178]"y"[167]d%(k)[178]1:f2[178]1
  151. 8560 [139]s$[178]"*"[167]8580
  152. 8570 k[178]k[170]1:[139]k[179][178]nf[167]8530
  153. 8580 [141]9700:[153][163]7)"validate the disk?close":[141]8000:[139]s$[178]""[167]230
  154. 8590 [139]f2[167][141]9700:[153][163]12)"deleting files"
  155. 8600 [160]15:[159]15,8,15:[129]k[178]1[164]nf
  156. 8610 [139]d%(k)[178]0[167]8660
  157. 8620 f$[178][202](d$(k),5,16):i[178]1
  158. 8630 [139][198]([202](f$,i,1))[178]160[167]f$[178][202](f$,1,i[171]1):[137]8650
  159. 8640 i[178]i[170]1:[139]i[179][178]16[167]8630
  160. 8650 [152]15,"s0:"[170]f$
  161. 8660 [130]:[139]f2[176]s$[178]"y"[167] nn$[178]""
  162. 8670 [139]s$[178]"y"[167][141]9700:[153][163]14)"validating":[152]15,"v0:"
  163. 8680 [160]15:[137]230
  164. 9000 [151]783,0:[151]781,r:[151]782,c:[158]65520:[142]
  165. 9080 [143] get cursor position
  166. 9090 [151]783,1:[158]65520:r[178][194](781):c[178][194](782):[142]
  167. 9100 [153]"load"[163]12)"ortantantantantantantantantantantantantan^":[153][163]12)"peek disk keeper peek"
  168. 9110 [153][163]12)"/tantantantantantantantantantantantantanexp":[142]
  169. 9200 r[178]6:c[178]2:[141]9000:x[178]10
  170. 9210 [153][163]x)"1) display directory"
  171. 9220 [153][163]x)"2) make disk label"
  172. 9230 [153][163]x)"3) clean up disk"
  173. 9240 [153][163]x)"4) protect file"
  174. 9250 [153][163]x)"5) unprotect file"
  175. 9260 [153][163]x)"6) rename disk"
  176. 9270 [153][163]x)"7) format new disk"
  177. 9280 [153][163]x)"8) send disk command"
  178. 9290 [153][163]x)"9) exit"
  179. 9300 [153][163]13)"selection:    cmdcmd";:[141]9090:w[178]1:[141]8000:x[178][197](s$)
  180. 9310 [139]x[177]0[175]x[179]10[167][142]
  181. 9320 [153]:[153]""[163]4)"choose a number between 1 and 9onononon":[137] 9300
  182. 9400 n2[178][181](nf[173]256):n1[178]nf[171]n2[172]256:[151]49366,n1:[151]49367,n2:[158]49152:[142]
  183. 9500 [160]15:[159]15,8,15,"io:":[141]9600:[142]
  184. 9600 [132]15,er,er$:[139]er[179]20[167][142]
  185. 9610 x[178]14[171][195](er$)[173]2:[139]x[179]0[167]x[178]0
  186. 9620 [153][163]x)"disk error: "er$
  187. 9630 [139]er[178]21[176]er[178]74[167][153]"      make sure disk is in drive"
  188. 9640 [141] 9800
  189. 9700 [151]781,7:[158]828:[142]
  190. 9800 r[178]22:c[178]0:[141]9000:[153]"        press any key to continue":[151]198,0
  191. 9810 [161]x$:[139]x$[178]""[167]9810
  192. 9820 [142]
  193. 9999 [153]"load":[160]3:[160]15:[128]
  194. 10000 [131] 173,214,192,208,6,173,215,192,208,1,96,165,47,24,105,10,133,34,165
  195. 10010 [131] 48,105,0,133,35,76,163,192,160,0,177,34,72,177,36,145,34,104,145,36
  196. 10020 [131] 200,192,3,208,241,76,116,192,169,0,141,218,192,168,177,34,240,59
  197. 10030 [131] 141,213,192,177,36,240,219,205,213,192,176,8,141,213,192,169,1,141
  198. 10040 [131] 218,192,200,177,34,133,251,177,36,133,253,200,177,34,133,252,177,36
  199. 10050 [131] 133,254,160,0,177,253,209,251,144,180,208,11,200,206,213,192,208
  200. 10060 [131] 242,173,218,192,208,167,165,36,24,105,3,133,36,165,37,105,0,133,37
  201. 10070 [131] 173,216,192,208,3,206,217,192,206,216,192,173,216,192,208,158,173
  202. 10080 [131] 217,192,208,153,165,34,24,105,3,133,34,165,35,105,0,133,35,173,214
  203. 10090 [131] 192,208,3,206,215,192,206,214,192,173,214,192,208,6,173,215,192,208
  204. 10100 [131] 1,96,173,214,192,141,216,192,173,215,192,141,217,192,165,34,24,105
  205. 10110 [131] 3,133,36,165,35,105,0,133,37,76,47,192
  206. 20000 [131] 160,0,24,32,240,255,165,209,133,251,165,210,133,252,169,232,197,251
  207. 20010 [131] 208,7,169,7,197,252,208,1,96,169,32,145,251,230,251,208,235,230,252
  208. 20020 [131] 208,231
  209. 30000 [131] 162,3,32,198,255,162,0,160,16,32,228,255,201,13,208,2,169,160,157
  210. 30010 [131] 179,195,232,136,208,240,32,204,255,32,165,195,169,16,145,251,200
  211. 30020 [131] 169,179,145,251,200,169,195,145,251,96,32,165,195,160,0,177,251,170
  212. 30030 [131] 200,177,251,133,253,200,177,251,133,254,160,0,232,202,208,1,96,177
  213. 30040 [131] 253,201,160,208,4,169,32,145,253,200,76,147,195,24,165,45,105,2,133
  214. 30050 [131] 251,165,46,105,0,133,252,96
  215.